package com.snk.back.service.impl;

import com.snk.back.dao.SysStateDao;
import com.snk.back.service.SysStateService;
import com.snk.common.exception.ServiceException;
import com.snk.common.pojo.Node;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;
import java.util.Map;

@Service
public class SysStateServiceImpl implements SysStateService {

    @Autowired
    private SysStateDao sysStateDao;


    @Override
    public List<Map<String, Object>> findObjects() {
        List<Map<String, Object>> list=
                sysStateDao.findObjects();
        if(list==null||list.size()==0)
            throw new ServiceException("没有类目信息");
        return list;
    }
    @Override
    public List<Node> findZTreeNodes() {
        List<Node> list=
                sysStateDao.findZTreeNodes();
        if(list==null||list.size()==0)
            throw new ServiceException("没有类目信息");
        return list;
    }


}
